package com.ddm.ddm.service.impl;

import com.ddm.ddm.entity.Admin;
import com.ddm.ddm.mapper.AdminMapper;
import com.ddm.ddm.service.IAdminService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lq
 * @since 2021-07-09
 */
@Service
public class AdminServiceImpl extends ServiceImpl<AdminMapper, Admin> implements IAdminService {

  @Autowired
  private AdminMapper adminMapper;

  @Override
  public Admin getAdmin(String gName,String gPassword) {
    return adminMapper.selectBygName(gName,gPassword);
  }

  @Override
  public int saveAmin(Admin admin) {
    return adminMapper.add(admin);
  }

}
